﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace AviationSimulator.Managers
{
    public class FileManager
    {
        private StreamWriter _writer;

        public FileManager()
        {
            _writer = null;
        }

        public void OpenConnection(string filePath)
        {
            _writer = new StreamWriter(filePath);
        }

        public void CloseConnection()
        {
            if (_writer != null)
                _writer.Dispose();
        }

        public void WriteToFile(string textToWrite)
        {
            _writer.WriteLine(textToWrite);
        }
    }
}
